import os
import pytest

from common.getbase import LIST_YESHI_DATA
from common.read_yaml import read_data_yaml
from utils.readmysql import RdTestcase

if __name__ == '__main__':

    path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_case\\test_get.py')
    # pytest.main(['-s', '-v', '--capture=sys', path])
    pytest.main(['-s', '-v', path])

    path2 = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_case\\test_post.py')
    # pytest.main(['-s', '-v', '--capture=sys', path])
    pytest.main(['-s', '-v', path2])



    LIST_YESHI_DATA[0]['supportedLightTypes']

    data = read_data_yaml()

    # mac 码
    mac_data = ''
    list = []
    mac = data['deviceCode']
    for i in range(5, 18, 2):
        # list.append(mac[i, i+2])
        mac_data = ':'.join(list)
    print(mac_data)
